package com.deer.wms.system.manage.model.dept;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.util.List;

/**
 * @author guo
 */
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class Dept {
    /**
     * 主键ID
     */
    @Id
    @Column(name = "dept_id")
    @TableId(type = IdType.AUTO)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer deptId;

    /**
     * 部门名
     */
    @Column(name = "dept_name")
    private String deptName;

    /**
     * 部门编码
     */
    @Column(name = "dept_code")
    private String deptCode;


    /**
     * 父级ID
     */
    @Column(name = "parent_id")
    private Integer parentId;

    /**
     * 备注
     */
    private String memo;


    @ApiModelProperty(value = "下级列表", required = false)
    @TableField(exist = false)
    private List<Dept> children;
    @ApiModelProperty(value = "是否启用0.否 1.是")
    private Boolean enabled;

    private Long erpDeptId;
    private Long org;
}